package com.song.controller;


import com.song.pojo.Student;
import com.song.pojo.User;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;


// http://localhost:8080/swagger-ui.html
@Api(tags = "hello控制层")
@RestController
public class HelloController {

    @ApiOperation(value = "query方法")
    @GetMapping("/query")
    public User query(@ApiParam(name = "用户id", value ="1", required = true) long id){
        return new User("song","123");
    }


    @ApiOperation(value = "login方法")
    @GetMapping("/login")
    public User login(){
        return new User("song","123");
    }


    @ApiOperation(value = "hello方法")
    @GetMapping("/hello")
    public Student hello(){
        return new Student();
    }
}
